#!/usr/bin/env python
import string

# Not all source in the tree is able to be built.
# This is all the source that can currently be built and the libraries
# they depend on.
source = []
libraries = []

# Evas
source.append('defl/c/evas/evas.d')
libraries.append('EVAS')

# Ecore
source.append('defl/c/ecore/ecore.d')
source.append('defl/c/ecore/evas.d')
source.append('defl/c/ecore/x/x.d')
source.append('defl/c/ecore/x/atoms.d')
source.append('defl/c/ecore/x/cursor.d')
libraries.append('ECORE')

buildenv = bld.env()

# Build shared library.
shared = bld.create_obj('d', 'shlib')
shared.source = string.join(source, ' ')
shared.target = 'defl'
shared.name = 'defl'
shared.uselib = string.join(libraries, ',')
shared.importpaths = '.'
shared.vnum = buildenv['VERSION']

# Build static library.
static = bld.create_obj('d', 'staticlib')
static.source = string.join(source, ' ')
static.target = 'defl'
static.name = 'defl'
static.uselib = string.join(libraries, ',')
static.importpaths = '.'


# Install the headers
install_files('PREFIX', 'include/d/defl/c/evas', 'defl/c/evas/*.d')
install_files('PREFIX', 'include/d/defl/c/ecore', 'defl/c/ecore/*.d')
install_files('PREFIX', 'include/d/defl/c/ecore/x', 'defl/c/ecore/x/*.d')

